﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class common_SelectMntEmp : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            TreeOrganAndEmpParams treeParams = new TreeOrganAndEmpParams();
            treeParams.SQLSelect = "select * from system_organ where flag_delete=0 order by parent_code,flag_sort";
            treeParams.SQLChildSelect = "select * from vi_system_employee_organ";
            treeParams.FieldParentID = "parent_code";
            treeParams.FieldCurrNodeID = "organ_code";
            treeParams.FieldText = "organ_name";
            treeParams.FieldEmpID = "emp_code";
            treeParams.FieldEmpName = "emp_name";
            treeParams.FieldEmpOrganID = "organ_code";
            treeParams.HeadMark = "00";
            treeParams.JSFunctionName = "setBackEmpValues";
            TreeViewManager treeManager = new TreeViewManager();
            TreeView1 = treeManager.CreateOrganAndEmpTree(TreeView1, treeParams);
        }
    }
}
